#include<iostream>
using namespace std;
int main(){
    int temp,h,m,s;
    cin>>temp;
    h=temp/3600;
    m=temp%3600/60;
    s=temp%60;
    cout<<h<<" "<<m<<" "<<s<<endl;
    return 0;
}
